package ru.spbsu.electromenu.model;

import ru.spbsu.electromenu.util.collections.Idable;

import java.util.Map;

/**
 * Date: 3/19/11
 * Time: 6:03 PM
 *
 * @author Artem Titov
 */
public class Session implements Idable {
    private int id = -1;
    private int tableId = -1;
    private Table table;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getTableId() {
        return tableId;
    }

    public void setTableId(int tableId) {
        this.tableId = tableId;
    }

    public Table getTable() {
        return table;
    }

    public void injectTable(Map<Integer, Table> tables) {
        this.table = tables.get(tableId);
    }
}
